"create"
********

* Description

* Usage

* Required Parameters

* Optional Parameters

* Global Parameters

* Example using required parameter


Description
===========

Creates a new mount target in the specified compartment and subnet.
You can associate a file system with a mount target only when they
exist in the same availability domain. Instances can connect to mount
targets in another availablity domain, but you might see higher
latency than with instances in the same availability domain as the
mount target.

Mount targets have one or more private IP addresses that you can
provide as the host portion of remote target parameters in client
mount commands. These private IP addresses are listed in the
privateIpIds property of the mount target and are highly available.
Mount targets also consume additional IP addresses in their subnet. Do
not use /30 or smaller subnets for mount target creation because they
do not have sufficient available IP addresses. Allow at least three IP
addresses for each mount target.

For information about access control and compartments, see Overview of
the IAM Service.

For information about availability domains, see Regions and
Availability Domains. To get a list of availability domains, use the
*ListAvailabilityDomains* operation in the Identity and Access
Management Service API.

All Oracle Cloud Infrastructure Services resources, including mount
targets, get an Oracle-assigned, unique ID called an Oracle Cloud
Identifier (OCID). When you create a resource, you can find its OCID
in the response. You can also retrieve a resource’s OCID by using a
List API operation on that resource type, or by viewing the resource
in the Console.


Usage
=====

   oci fs mount-target create [OPTIONS]


Required Parameters
===================

--availability-domain [text]

The availability domain in which to create the mount target.

Example:

   Uocm:PHX-AD-1

--compartment-id, -c [text]

The OCID of the compartment in which to create the mount target.

--subnet-id [text]

The OCID of the subnet in which to create the mount target.


Optional Parameters
===================

--defined-tags [complex type]

Defined tags for this resource. Each key is predefined and scoped to a
namespace. For more information, see Resource Tags. Example:
*{“Operations”: {“CostCenter”: “42”}}* This is a complex type whose
value must be valid JSON. The value can be provided as a string on the
command line or passed in as a file using the file://path/to/file
syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--display-name [text]

A user-friendly name. It does not have to be unique, and it is
changeable. Avoid entering confidential information.

Example:

   My mount target

--freeform-tags [complex type]

Free-form tags for this resource. Each tag is a simple key-value pair
with no predefined name, type, or namespace. For more information, see
Resource Tags. Example: *{“Department”: “Finance”}* This is a complex
type whose value must be valid JSON. The value can be provided as a
string on the command line or passed in as a file using the
file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--from-json [text]

Provide input to this command as a JSON document from a file using the
file://path-to/file syntax.

The "--generate-full-command-json-input" option can be used to
generate a sample json file to be used with this command option. The
key names are pre-populated and match the command option names
(converted to camelCase format, e.g. compartment-id –> compartmentId),
while the values of the keys need to be populated by the user before
using the sample file as an input to this command. For any command
option that accepts multiple values, the value of the key can be a
JSON array.

Options can still be provided on the command line. If an option exists
in both the JSON document and the command line then the command line
specified value will be used.

For examples on usage of this option, please see our “using CLI with
advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Conte
nt/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--hostname-label [text]

The hostname for the mount target’s IP address, used for DNS
resolution. The value is the hostname portion of the private IP
address’s fully qualified domain name (FQDN). For example, *files-1*
in the FQDN *files-1.subnet123.vcn1.oraclevcn.com*. Must be unique
across all VNICs in the subnet and comply with RFC 952 and RFC 1123.

Note: This attribute value is stored in the PrivateIp resource, not in
the *mountTarget* resource. To update the *hostnameLabel*, use
*GetMountTarget* to obtain the OCIDs of the mount target’s private IPs
(*privateIpIds*). Then, you can use UpdatePrivateIp to update the
*hostnameLabel* value.

For more information, see DNS in Your Virtual Cloud Network.

Example:

   files-1

--idmap-type [text]

The method used to map a Unix UID to secondary groups, if any.

--ip-address [text]

A private IP address of your choice. Must be an available IP address
within the subnet’s CIDR. If you don’t specify a value, Oracle
automatically assigns a private IP address from the subnet.

Note: This attribute value is stored in the PrivateIp resource, not in
the *mountTarget* resource. To update the *ipAddress*, use
*GetMountTarget* to obtain the OCIDs of the mount target’s private IPs
(*privateIpIds*). Then, you can use UpdatePrivateIp to update the
*ipAddress* value.

Example:

   10.0.3.3

--kerberos [complex type]

This is a complex type whose value must be valid JSON. The value can
be provided as a string on the command line or passed in as a file
using the file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--ldap-idmap [complex type]

This is a complex type whose value must be valid JSON. The value can
be provided as a string on the command line or passed in as a file
using the file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--max-wait-seconds [integer]

The maximum time to wait for the resource to reach the lifecycle state
defined by "--wait-for-state". Defaults to 1200 seconds.

--nsg-ids [complex type]

A list of Network Security Group OCIDs associated with this mount
target. A maximum of 5 is allowed. Setting this to an empty array
after the list is created removes the mount target from all NSGs. For
more information about NSGs, see Security Rules. This is a complex
type whose value must be valid JSON. The value can be provided as a
string on the command line or passed in as a file using the
file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--wait-for-state [text]

This operation creates, modifies or deletes a resource that has a
defined lifecycle state. Specify this option to perform the action and
then wait until the resource reaches a given lifecycle state. Multiple
states can be specified, returning on the first state. For example, "
--wait-for-state" SUCCEEDED "--wait-for-state" FAILED would return on
whichever lifecycle state is reached first. If timeout is reached, a
return code of 2 is returned. For any other error, a return code of 1
is returned.

Accepted values are:

   ACTIVE, CREATING, DELETED, DELETING, FAILED

--wait-interval-seconds [integer]

Check every "--wait-interval-seconds" to see whether the resource has
reached the lifecycle state defined by "--wait-for-state". Defaults to
30 seconds.


Global Parameters
=================

Use "oci --help" for help on global parameters.

"--auth-purpose", "--auth", "--cert-bundle", "--cli-auto-prompt", "--
cli-rc-file", "--config-file", "--connection-timeout", "--debug", "--
defaults-file", "--endpoint", "--generate-full-command-json-input", "
--generate-param-json-input", "--help", "--latest-version", "--max-
retries", "--no-retry", "--opc-client-request-id", "--opc-request-id",
"--output", "--profile", "--proxy", "--query", "--raw-output", "--
read-timeout", "--realm-specific-endpoint", "--region", "--release-
info", "--request-id", "--version", "-?", "-d", "-h", "-i", "-v"


Example using required parameter
================================

Copy the following CLI commands into a file named example.sh. Run the
command by typing “bash example.sh” and replacing the example
parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-
like shell. You need to set up the OCI configuration and appropriate
security policies before trying the examples.

       export availability_domain=<substitute-value-of-availability_domain> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/fs/mount-target/create.html#cmdoption-availability-domain
       export compartment_id=<substitute-value-of-compartment_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/fs/mount-target/create.html#cmdoption-compartment-id
       export subnet_id=<substitute-value-of-subnet_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/fs/mount-target/create.html#cmdoption-subnet-id

       oci fs mount-target create --availability-domain $availability_domain --compartment-id $compartment_id --subnet-id $subnet_id
