Exemple #1
0
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
    client = cli_util.build_client('stream', ctx)
    result = client.consumer_heartbeat(
        stream_id=stream_id,
        cursor=cursor,
        **kwargs
    )
    cli_util.render_response(result, ctx)


@cursor_group.command(name=cli_util.override('stream.create_cursor.command_name', 'create'), help=u"""Creates a cursor. Cursors are used to consume a stream, starting from a specific point in the partition and going forward from there. You can create a cursor based on an offset, a time, the trim horizon, or the most recent message in the stream. As the oldest message inside the retention period boundary, using the trim horizon effectively lets you consume all messages in the stream. A cursor based on the most recent message allows consumption of only messages that are added to the stream after you create the cursor. Cursors expire five minutes after you receive them from the service.

The top level --endpoint parameter must be supplied for this operation.""")
@cli_util.option('--stream-id', required=True, help=u"""The OCID of the stream.""")
@cli_util.option('--partition', required=True, help=u"""The partition to get messages from.""")
@cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["AFTER_OFFSET", "AT_OFFSET", "AT_TIME", "LATEST", "TRIM_HORIZON"]), help=u"""The type of cursor, which determines the starting point from which the stream will be consumed:

- `AFTER_OFFSET:` The partition position immediately following the offset you specify. (Offsets are assigned when you successfully append a message to a partition in a stream.) - `AT_OFFSET:` The exact partition position indicated by the offset you specify. - `AT_TIME:` A specific point in time. - `LATEST:` The most recent message in the partition that was added after the cursor was created. - `TRIM_HORIZON:` The oldest message in the partition that is within the retention period window.""")
@cli_util.option('--offset', type=click.INT, help=u"""The offset to consume from if the cursor type is `AT_OFFSET` or `AFTER_OFFSET`.""")
@cli_util.option('--time', type=custom_types.CLI_DATETIME, help=u"""The time to consume from if the cursor type is `AT_TIME`, expressed in [RFC 3339] timestamp format.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'streaming', 'class': 'Cursor'})
@cli_util.wrap_exceptions
def create_cursor(ctx, from_json, stream_id, partition, type, offset, time):

    if isinstance(stream_id, six.string_types) and len(stream_id.strip()) == 0:
        raise click.UsageError('Parameter --stream-id cannot be whitespace or empty string')

    kwargs = {}
Exemple #2
0

budget_root_group.add_command(alert_rule_group)
budget_root_group.add_command(budget_group)


@alert_rule_group.command(name=cli_util.override(
    'create_alert_rule.command_name', 'create'),
                          help=u"""Creates a new Alert Rule.""")
@cli_util.option('--budget-id',
                 required=True,
                 help=u"""The unique Budget OCID""")
@cli_util.option(
    '--type',
    required=True,
    type=custom_types.CliCaseInsensitiveChoice(["ACTUAL", "FORECAST"]),
    help=
    u"""Type of alert. Valid values are ACTUAL (the alert will trigger based on actual usage) or FORECAST (the alert will trigger based on predicted usage)."""
)
@cli_util.option(
    '--threshold',
    required=True,
    type=click.FLOAT,
    help=
    u"""The threshold for triggering the alert expressed as a whole number or decimal value. If thresholdType is ABSOLUTE, threshold can have at most 12 digits before the decimal point and up to 2 digits after the decimal point. If thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to 2 digits after the decimal point."""
)
@cli_util.option('--threshold-type',
                 required=True,
                 type=custom_types.CliCaseInsensitiveChoice(
                     ["PERCENTAGE", "ABSOLUTE"]),
                 help=u"""The type of threshold.""")
Exemple #3
0
                 required=True,
                 help=u"""The OS version for which the plugin is supported.""")
@cli_util.option(
    '--page',
    help=
    u"""For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination]."""
)
@cli_util.option(
    '--limit',
    type=click.INT,
    help=
    u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination]."""
)
@cli_util.option(
    '--sort-by',
    type=custom_types.CliCaseInsensitiveChoice(["TIMECREATED", "DISPLAYNAME"]),
    help=
    u"""The field to sort by. You can provide one sort order (`sortOrder`). Default order for `TIMECREATED` is descending.

**Note:** In general, some \"List\" operations (for example, `ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these \"List\" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted."""
)
@cli_util.option(
    '--sort-order',
    type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]),
    help=
    u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`). The `DISPLAYNAME` sort order is case sensitive."""
)
@cli_util.option('--name', help=u"""The plugin name""")
@cli_util.option(
    '--all',
    'all_pages',
Exemple #4
0
@cursor_group.command(
    name=cli_util.override('stream.create_cursor.command_name', 'create'),
    help=
    u"""Creates a cursor. Cursors are used to consume a stream, starting from a specific point in the partition and going forward from there. You can create a cursor based on an offset, a time, the trim horizon, or the most recent message in the stream. As the oldest message inside the retention period boundary, using the trim horizon effectively lets you consume all messages in the stream. A cursor based on the most recent message allows consumption of only messages that are added to the stream after you create the cursor. Cursors expire five minutes after you receive them from the service.

The top level --endpoint parameter must be supplied for this operation.""")
@cli_util.option('--stream-id',
                 required=True,
                 help=u"""The OCID of the stream to create a cursor for.""")
@cli_util.option('--partition',
                 required=True,
                 help=u"""The partition to get messages from.""")
@cli_util.option(
    '--type',
    required=True,
    type=custom_types.CliCaseInsensitiveChoice(
        ["AFTER_OFFSET", "AT_OFFSET", "AT_TIME", "LATEST", "TRIM_HORIZON"]),
    help=
    u"""The type of cursor, which determines the starting point from which the stream will be consumed:

- `AFTER_OFFSET:` The partition position immediately following the offset you specify. (Offsets are assigned when you successfully append a message to a partition in a stream.) - `AT_OFFSET:` The exact partition position indicated by the offset you specify. - `AT_TIME:` A specific point in time. - `LATEST:` The most recent message in the partition that was added after the cursor was created. - `TRIM_HORIZON:` The oldest message in the partition that is within the retention period window."""
)
@cli_util.option(
    '--offset',
    type=click.INT,
    help=
    u"""The offset to consume from if the cursor type is `AT_OFFSET` or `AFTER_OFFSET`."""
)
@cli_util.option(
    '--time',
    type=custom_types.CLI_DATETIME,
    help=
Exemple #5
0
    if if_match is not None:
        kwargs['if_match'] = if_match
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
    client = cli_util.build_client('opa', 'opa_instance', ctx)
    result = client.cancel_work_request(
        work_request_id=work_request_id,
        **kwargs
    )
    cli_util.render_response(result, ctx)


@opa_instance_group.command(name=cli_util.override('opa.change_opa_instance_compartment.command_name', 'change-compartment'), help=u"""Moves a OpaInstance resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeOpaInstanceCompartment)""")
@cli_util.option('--opa-instance-id', required=True, help=u"""unique OpaInstance identifier""")
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment into which the resource should be moved.""")
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain 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.""")
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request to see if it has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
@cli_util.wrap_exceptions
def change_opa_instance_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, opa_instance_id, compartment_id, if_match):

    if isinstance(opa_instance_id, six.string_types) and len(opa_instance_id.strip()) == 0:
        raise click.UsageError('Parameter --opa-instance-id cannot be whitespace or empty string')

    kwargs = {}
    if if_match is not None:
        kwargs['if_match'] = if_match
Exemple #6
0
        )

    kwargs = {}
    client = cli_util.build_client('transfer_device', ctx)
    result = client.get_transfer_device(
        id=id, transfer_device_label=transfer_device_label, **kwargs)
    cli_util.render_response(result, ctx)


@transfer_device_group.command(
    name=cli_util.override('list_transfer_devices.command_name', 'list'),
    help=u"""Lists Transfer Devices associated with a transferJob""")
@cli_util.option('--id', required=True, help=u"""ID of the Transfer Job""")
@cli_util.option('--lifecycle-state',
                 type=custom_types.CliCaseInsensitiveChoice([
                     "PREPARING", "READY", "PACKAGED", "ACTIVE", "PROCESSING",
                     "COMPLETE", "MISSING", "ERROR", "DELETED", "CANCELLED"
                 ]),
                 help=u"""filtering by lifecycleState""")
@cli_util.option('--display-name', help=u"""filtering by displayName""")
@cli_util.option('--all',
                 'all_pages',
                 is_flag=True,
                 help="""Fetches all pages of results.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(
    input_params_to_complex_types={},
    output_type={
        'module': 'dts',
        'class': 'MultipleTransferDevices'
Exemple #7
0
kms_crypto_root_group.add_command(verified_data_group)
kms_crypto_root_group.add_command(exported_key_data_group)
kms_crypto_root_group.add_command(decrypted_data_group)
kms_crypto_root_group.add_command(generated_key_group)
kms_crypto_root_group.add_command(encrypted_data_group)


@decrypted_data_group.command(name=cli_util.override('kms_crypto.decrypt.command_name', 'decrypt'), help=u"""Decrypts data using the given [DecryptDataDetails] resource.

The top level --endpoint parameter must be supplied for this operation. \n[Command Reference](decrypt)""")
@cli_util.option('--ciphertext', required=True, help=u"""The encrypted data to decrypt.""")
@cli_util.option('--key-id', required=True, help=u"""The OCID of the key used to encrypt the ciphertext.""")
@cli_util.option('--associated-data', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Information that can be used to provide an encryption context for the encrypted data. The length of the string representation of the associated data must be fewer than 4096 characters.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--logging-context', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Information that provides context for audit logging. You can provide this additional data as key-value pairs to include in audit logs when audit logging is enabled.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--key-version-id', help=u"""The OCID of the keyVersion used to encrypt the ciphertext.""")
@cli_util.option('--encryption-algorithm', type=custom_types.CliCaseInsensitiveChoice(["AES_256_GCM", "RSA_OAEP_SHA_1", "RSA_OAEP_SHA_256"]), help=u"""Encryption algorithm to be used while encrypting/decrypting data using a customer key AES_256_GCM is the supported value AES keys and uses GCM mode of operation RSA_OAEP_SHA_1 and RSA_OAEP_SHA_256 are supported for RSA keys and use OAEP padding.""")
@json_skeleton_utils.get_cli_json_input_option({'associated-data': {'module': 'key_management', 'class': 'dict(str, string)'}, 'logging-context': {'module': 'key_management', 'class': 'dict(str, string)'}})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'associated-data': {'module': 'key_management', 'class': 'dict(str, string)'}, 'logging-context': {'module': 'key_management', 'class': 'dict(str, string)'}}, output_type={'module': 'key_management', 'class': 'DecryptedData'})
@cli_util.wrap_exceptions
def decrypt(ctx, from_json, ciphertext, key_id, associated_data, logging_context, key_version_id, encryption_algorithm):

    kwargs = {}
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])

    _details = {}
    _details['ciphertext'] = ciphertext
    _details['keyId'] = key_id

    if associated_data is not None:
Exemple #8
0
            file.write(chunk)
    finally:
        if bar:
            bar.render_finish()
        file.close()


@stream_distribution_channel_group.command(
    name=cli_util.override('media_stream.generate_session_token.command_name',
                           'generate-session-token'),
    help=
    u"""Generate a new streaming session token. \n[Command Reference](generateSessionToken)"""
)
@cli_util.option('--scopes',
                 required=True,
                 type=custom_types.CliCaseInsensitiveChoice(
                     ["PLAYLIST", "EDGE"]),
                 help=u"""Array of scopes the token can act upon.""")
@cli_util.option(
    '--packaging-config-id',
    required=True,
    help=
    u"""The packaging config resource identifier used to limit the scope of the token."""
)
@cli_util.option(
    '--time-expires',
    type=custom_types.CLI_DATETIME,
    help=u"""Token expiry time. An RFC3339 formatted datetime string.""" +
    custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option(
    '--asset-ids',
    type=custom_types.CLI_COMPLEX_TYPE,
Exemple #9
0
    help=
    u"""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\"}`""" +
    custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option(
    '--defined-tags',
    type=custom_types.CLI_COMPLEX_TYPE,
    help=
    u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].

Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" +
    custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option(
    '--wait-for-state',
    type=custom_types.CliCaseInsensitiveChoice(
        ["PENDING", "ACTIVE", "DELETED"]),
    multiple=True,
    help=
    """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."""
)
@cli_util.option(
    '--max-wait-seconds',
    type=click.INT,
    help=
    """The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds."""
)
@cli_util.option(
    '--wait-interval-seconds',
    type=click.INT,
    help=
    """Check every --wait-interval-seconds to see whether the resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds."""
@click.command(cli_util.override('functions_invoke.function_group.command_name', 'function'), cls=CommandGroupWithAlias, help="""A function resource defines the code (Docker image) and configuration for a specific function. Functions are defined in applications. Avoid entering confidential information.""")
@cli_util.help_option_group
def function_group():
    pass


fn_service_cli.fn_service_group.add_command(functions_invoke_root_group)
functions_invoke_root_group.add_command(function_group)


@function_group.command(name=cli_util.override('functions_invoke.invoke_function.command_name', 'invoke'), help=u"""Invokes a function \n[Command Reference](invokeFunction)""")
@cli_util.option('--function-id', required=True, help=u"""The [OCID] of this function.""")
@cli_util.option('--file', type=click.File(mode='wb'), required=True, help="The name of the file that will receive the response data, or '-' to write to STDOUT.")
@cli_util.option('--invoke-function-body', help=u"""The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit.""")
@cli_util.option('--fn-intent', type=custom_types.CliCaseInsensitiveChoice(["httprequest", "cloudevent"]), help=u"""An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'.""")
@cli_util.option('--fn-invoke-type', type=custom_types.CliCaseInsensitiveChoice(["detached", "sync"]), help=u"""Indicates whether the functions platform should execute the request directly and return the result ('sync') or whether the platform should enqueue the request for later processing and acknowledge that it has been processed ('detached').""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
@cli_util.wrap_exceptions
def invoke_function(ctx, from_json, file, function_id, invoke_function_body, fn_intent, fn_invoke_type):

    if isinstance(function_id, six.string_types) and len(function_id.strip()) == 0:
        raise click.UsageError('Parameter --function-id cannot be whitespace or empty string')

    kwargs = {}
    if invoke_function_body is not None:
        kwargs['invoke_function_body'] = invoke_function_body
    if fn_intent is not None:
        kwargs['is_heat_wave_cluster_attached'] = kwargs[
            'is_heatwave_cluster_attached']
        kwargs.pop('is_heatwave_cluster_attached')

    ctx.invoke(dbsystem_cli.list_db_systems, **kwargs)


@cli_util.copy_params_from_generated_command(
    dbsystem_cli.start_db_system, params_to_exclude=['wait_for_state'])
@dbsystem_cli.db_system_root_group.command(
    name=dbsystem_cli.start_db_system.name,
    help=dbsystem_cli.start_db_system.help)
@cli_util.option(
    '--wait-for-state',
    type=custom_types.CliCaseInsensitiveChoice([
        "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED",
        "FAILED"
    ]),
    multiple=True,
    help=
    """This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain 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."""
)
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(
    input_params_to_complex_types={})
@cli_util.wrap_exceptions
def start_db_system_extended(ctx, from_json, wait_for_state, max_wait_seconds,
                             wait_interval_seconds, db_system_id, if_match,
                             **kwargs):
    if isinstance(db_system_id, six.string_types) and len(
            db_system_id.strip()) == 0:
        raise click.UsageError(
Exemple #12
0
    kwargs = {}
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
    client = cli_util.build_client('tenant_manager_control_plane', 'work_request', ctx)
    result = client.get_work_request(
        work_request_id=work_request_id,
        **kwargs
    )
    cli_util.render_response(result, ctx)


@work_request_error_group.command(name=cli_util.override('work_request.list_work_request_errors.command_name', 'list'), help=u"""Return a (paginated) list of errors for a given work request. \n[Command Reference](listWorkRequestErrors)""")
@cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, whether 'asc' or 'desc'.""")
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'tenant_manager_control_plane', 'class': 'WorkRequestErrorCollection'})
@cli_util.wrap_exceptions
def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_order):

    if all_pages and limit:
        raise click.UsageError('If you provide the --all option you cannot provide the --limit option')

    if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
        raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
Exemple #13
0
@cli_util.option('--display-name', help=u"""A descriptive name for the SDDC. SDDC name requirements are 1-16 character length limit, Must start with a letter, Must be English letters, numbers, - only, No repeating hyphens, Must be unique within the region. Avoid entering confidential information.""")
@cli_util.option('--instance-display-name-prefix', help=u"""A prefix used in the name of each ESXi host and Compute instance in the SDDC. If this isn't set, the SDDC's `displayName` is used as the prefix.

For example, if the value is `mySDDC`, the ESXi hosts are named `mySDDC-1`, `mySDDC-2`, and so on.""")
@cli_util.option('--is-hcx-enabled', type=click.BOOL, help=u"""Indicates whether to enable HCX for this SDDC.""")
@cli_util.option('--hcx-vlan-id', help=u"""The [OCID] of the VLAN to use for the HCX component of the VMware environment. This value is required only when `isHcxEnabled` is true.""")
@cli_util.option('--workload-network-cidr', help=u"""The CIDR block for the IP addresses that VMware VMs in the SDDC use to run application workloads.""")
@cli_util.option('--replication-vlan-id', help=u"""The [OCID] of the VLAN used by the SDDC for the vSphere Replication component of the VMware environment.""")
@cli_util.option('--provisioning-vlan-id', help=u"""The [OCID] of the VLAN used by the SDDC for the Provisioning component of the VMware environment.""")
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""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\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].

Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain 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.""")
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request to see if it has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ocvp', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ocvp', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ocvp', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ocvp', 'class': 'dict(str, dict(str, object))'}})
@cli_util.wrap_exceptions
def create_sddc(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_availability_domain, vmware_software_version, compartment_id, esxi_hosts_count, ssh_authorized_keys, provisioning_subnet_id, vsphere_vlan_id, vmotion_vlan_id, vsan_vlan_id, nsx_v_tep_vlan_id, nsx_edge_v_tep_vlan_id, nsx_edge_uplink1_vlan_id, nsx_edge_uplink2_vlan_id, display_name, instance_display_name_prefix, is_hcx_enabled, hcx_vlan_id, workload_network_cidr, replication_vlan_id, provisioning_vlan_id, freeform_tags, defined_tags):

    kwargs = {}
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])

    _details = {}
    _details['computeAvailabilityDomain'] = compute_availability_domain
    _details['vmwareSoftwareVersion'] = vmware_software_version
    u"""Sign a container image metadata and upload the signature. \n[Command Reference](SignAndUploadContainerImageSignatureMetadata)"""
)
@cli_util.option(
    '--kms-key-id',
    required=True,
    help=u"""The [OCID] of the kmsKeyId used to sign the container image.""")
@cli_util.option(
    '--kms-key-version-id',
    required=True,
    help=
    u"""The [OCID] of the kmsKeyVersionId used to sign the container image.""")
@cli_util.option(
    '--signing-algorithm',
    required=True,
    type=custom_types.CliCaseInsensitiveChoice([
        "SHA_224_RSA_PKCS_PSS", "SHA_256_RSA_PKCS_PSS", "SHA_384_RSA_PKCS_PSS",
        "SHA_512_RSA_PKCS_PSS"
    ]),
    help=
    u"""The algorithm to be used for signing. These are the only supported signing algorithms for container images."""
)
@cli_util.option(
    '--compartment-id',
    required=True,
    help=
    u"""The [OCID] of the compartment in which the container repository exists."""
)
@cli_util.option('--image-id',
                 required=True,
                 help=u"""The [OCID] of the container image.""")
@cli_util.option(
    '--description',
Exemple #15
0
                 help=u"""The [OCID] of this function.""")
@cli_util.option(
    '--file',
    type=click.File(mode='wb'),
    required=True,
    help=
    "The name of the file that will receive the response data, or '-' to write to STDOUT."
)
@cli_util.option(
    '--invoke-function-body',
    help=
    u"""The body of the function invocation. Note: The maximum size of the request is limited. This limit is currently 6MB and the endpoint will not accept requests that are bigger than this limit."""
)
@cli_util.option(
    '--fn-intent',
    type=custom_types.CliCaseInsensitiveChoice(["httprequest", "cloudevent"]),
    help=
    u"""An optional intent header that indicates to the FDK the way the event should be interpreted. E.g. 'httprequest', 'cloudevent'."""
)
@cli_util.option(
    '--fn-invoke-type',
    type=custom_types.CliCaseInsensitiveChoice(["detached", "sync"]),
    help=
    u"""Indicates whether the functions platform should execute the request directly and return the result ('sync') or whether the platform should enqueue the request for later processing and acknowledge that it has been processed ('detached')."""
)
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(
    input_params_to_complex_types={})
@cli_util.wrap_exceptions
        **kwargs
    )
    cli_util.render_response(result, ctx)


@transcription_job_group.command(name=cli_util.override('speech.create_transcription_job.command_name', 'create'), help=u"""Creates a new Transcription Job. \n[Command Reference](createTranscriptionJob)""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment that contains the transcriptionJob.""")
@cli_util.option('--input-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--output-location', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--display-name', help=u"""Transcription job name.""")
@cli_util.option('--description', help=u"""Transcription job description.""")
@cli_util.option('--model-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--normalization', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED"]), multiple=True, help="""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.""")
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
@json_skeleton_utils.get_cli_json_input_option({'model-details': {'module': 'ai_speech', 'class': 'TranscriptionModelDetails'}, 'normalization': {'module': 'ai_speech', 'class': 'TranscriptionNormalization'}, 'input-location': {'module': 'ai_speech', 'class': 'InputLocation'}, 'output-location': {'module': 'ai_speech', 'class': 'OutputLocation'}, 'freeform-tags': {'module': 'ai_speech', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_speech', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'model-details': {'module': 'ai_speech', 'class': 'TranscriptionModelDetails'}, 'normalization': {'module': 'ai_speech', 'class': 'TranscriptionNormalization'}, 'input-location': {'module': 'ai_speech', 'class': 'InputLocation'}, 'output-location': {'module': 'ai_speech', 'class': 'OutputLocation'}, 'freeform-tags': {'module': 'ai_speech', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_speech', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_speech', 'class': 'TranscriptionJob'})
@cli_util.wrap_exceptions
def create_transcription_job(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, input_location, output_location, display_name, description, model_details, normalization, freeform_tags, defined_tags):

    kwargs = {}
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])

    _details = {}
    _details['compartmentId'] = compartment_id
    _details['inputLocation'] = cli_util.parse_json_parameter("input_location", input_location)
Exemple #17
0
                           'list'),
    help=
    u"""Includes a list of resource limits that are currently supported. If the 'areQuotasSupported' property is true, you can create quota policies on top of this limit at the compartment level."""
)
@cli_util.option(
    '--compartment-id',
    required=True,
    help=
    u"""The OCID of the parent compartment (remember that the tenancy is simply the root compartment)."""
)
@cli_util.option('--service-name', help=u"""The target service name.""")
@cli_util.option(
    '--name',
    help=u"""Optional field, filter for a specific resource limit.""")
@cli_util.option('--sort-by',
                 type=custom_types.CliCaseInsensitiveChoice(
                     ["name", "description"]),
                 help=u"""The field to sort by.""")
@cli_util.option(
    '--sort-order',
    type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]),
    help=
    u"""The sort order to use, either 'asc' or 'desc'. By default it will be ascending."""
)
@cli_util.option(
    '--limit',
    type=click.INT,
    help=
    u"""The maximum number of items to return in a paginated \"List\" call.""")
@cli_util.option(
    '--page',
    help=
Exemple #18
0
    u"""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\"}`""" +
    custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option(
    '--defined-tags',
    type=custom_types.CLI_COMPLEX_TYPE,
    help=
    u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].

Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" +
    custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option(
    '--wait-for-state',
    type=custom_types.CliCaseInsensitiveChoice([
        "CREATING", "ACTIVE", "INPROGRESS", "SUCCEEDED", "FAILED", "CANCELLED",
        "DELETED"
    ]),
    multiple=True,
    help=
    """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."""
)
@cli_util.option(
    '--max-wait-seconds',
    type=click.INT,
    help=
    """The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds."""
)
@cli_util.option(
    '--wait-interval-seconds',
    type=click.INT,
    help=
Exemple #19
0
def quota_group():
    pass


limits_service_cli.limits_service_group.add_command(quotas_root_group)
quotas_root_group.add_command(quota_group)


@quota_group.command(name=cli_util.override('quotas.create_quota.command_name', 'create'), help=u"""Creates a new quota with the details supplied.""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment containing the resource this quota applies to.""")
@cli_util.option('--description', required=True, help=u"""The description you assign to the quota.""")
@cli_util.option('--name', required=True, help=u"""The name you assign to the quota during creation. The name must be unique across all quotas in the tenancy and cannot be changed.""")
@cli_util.option('--statements', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""An array of quota statements written in the declarative quota statement language.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""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\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE"]), multiple=True, help="""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.""")
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
@json_skeleton_utils.get_cli_json_input_option({'statements': {'module': 'limits', 'class': 'list[string]'}, 'freeform-tags': {'module': 'limits', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'limits', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'statements': {'module': 'limits', 'class': 'list[string]'}, 'freeform-tags': {'module': 'limits', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'limits', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'limits', 'class': 'Quota'})
@cli_util.wrap_exceptions
def create_quota(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, description, name, statements, freeform_tags, defined_tags):

    kwargs = {}
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])

    details = {}
    details['compartmentId'] = compartment_id
    details['description'] = description
Exemple #20
0
    cli_util.render_response(result, ctx)


@http_redirect_group.command(name=cli_util.override('redirect.create_http_redirect.command_name', 'create'), help=u"""Creates a new HTTP Redirect on the WAF edge.""")
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the HTTP Redirects compartment.""")
@cli_util.option('--domain', required=True, help=u"""The domain from which traffic will be redirected.""")
@cli_util.option('--target', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The redirect target object including all the redirect data.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--display-name', help=u"""The user-friendly name of the HTTP Redirect. The name can be changed and does not need to be unique.""")
@cli_util.option('--response-code', type=click.INT, help=u"""The response code returned for the redirect to the client. reference - https://tools.ietf.org/html/rfc7231#section-6.4""")
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""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\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].

Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain 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.""")
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request to see if it has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
@json_skeleton_utils.get_cli_json_input_option({'target': {'module': 'waas', 'class': 'HttpRedirectTarget'}, 'freeform-tags': {'module': 'waas', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'waas', 'class': 'dict(str, dict(str, object))'}})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'target': {'module': 'waas', 'class': 'HttpRedirectTarget'}, 'freeform-tags': {'module': 'waas', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'waas', 'class': 'dict(str, dict(str, object))'}})
@cli_util.wrap_exceptions
def create_http_redirect(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, domain, target, display_name, response_code, freeform_tags, defined_tags):

    kwargs = {}
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])

    details = {}
    details['compartmentId'] = compartment_id
    details['domain'] = domain
Exemple #21
0
    + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option(
    '--time-to',
    required=True,
    type=custom_types.CLI_DATETIME,
    help=
    u"""Final date to filter Computed Usage data in SPM, expressed in RFC 3339 timestamp format."""
    + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option(
    '--parent-product',
    help=
    u"""Product part number for subscribed service line, called parent product."""
)
@cli_util.option(
    '--grouping',
    type=custom_types.CliCaseInsensitiveChoice(
        ["HOURLY", "DAILY", "MONTHLY", "NONE"]),
    help=
    u"""Grouping criteria to use for aggregate the computed Usage, either hourly (`HOURLY`), daily (`DAILY`), monthly(`MONTHLY`) or none (`NONE`) to not follow a grouping criteria by date."""
)
@cli_util.option(
    '--limit',
    type=click.INT,
    help=
    u"""The maximum number aggregatedComputedUsages of items to return within the Subscription \"List\" call, this counts the overall count across all items Example: `500`"""
)
@cli_util.option(
    '--page',
    help=
    u"""The value of the `opc-next-page` response header from the previous \"List\" call."""
)
@cli_util.option(
Exemple #22
0
    help=
    """The OCID of the compartment. Because announcements are specific to a tenancy, this is the OCID of the root compartment."""
)
@cli_util.option(
    '--limit',
    type=click.INT,
    help=
    """The maximum number of items to return in a paginated \"List\" call.""")
@cli_util.option(
    '--page',
    help=
    """The value of the `opc-next-page` response header from the previous \"List\" call."""
)
@cli_util.option('--announcement-type', help="""The type of announcement.""")
@cli_util.option('--lifecycle-state',
                 type=custom_types.CliCaseInsensitiveChoice(
                     ["ACTIVE", "INACTIVE"]),
                 help="""The announcement's current lifecycle state.""")
@cli_util.option(
    '--is-banner',
    type=click.BOOL,
    help="""Whether the announcement is displayed as a console banner.""")
@cli_util.option(
    '--sort-by',
    type=custom_types.CliCaseInsensitiveChoice([
        "timeOneValue", "timeTwoValue", "timeCreated", "referenceTicketNumber",
        "summary", "announcementType"
    ]),
    help="""The criteria to sort by. You can specify only one sort order.""")
@cli_util.option(
    '--sort-order',
    type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]),
    kwargs = {}
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
    client = cli_util.build_client('announcements_service', 'announcement', ctx)
    result = client.get_announcement_user_status(
        announcement_id=announcement_id,
        **kwargs
    )
    cli_util.render_response(result, ctx)


@announcements_collection_group.command(name=cli_util.override('announce.list_announcements.command_name', 'list-announcements'), help=u"""Gets a list of announcements for the current tenancy. \n[Command Reference](listAnnouncements)""")
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment. Because announcements are specific to a tenancy, this is the OCID of the root compartment.""")
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return in a paginated \"List\" call.""")
@cli_util.option('--page', help=u"""The value of the `opc-next-page` response header from the previous \"List\" call.""")
@cli_util.option('--announcement-type', help=u"""The type of announcement.""")
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "INACTIVE"]), help=u"""The announcement's current lifecycle state.""")
@cli_util.option('--is-banner', type=click.BOOL, help=u"""Whether the announcement is displayed as a console banner.""")
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeOneValue", "timeTwoValue", "timeCreated", "referenceTicketNumber", "summary", "announcementType"]), help=u"""The criteria to sort by. You can specify only one sort order.""")
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use. (Sorting by `announcementType` orders the announcements list according to importance.)""")
@cli_util.option('--time-one-earliest-time', type=custom_types.CLI_DATETIME, help=u"""The boundary for the earliest `timeOneValue` date on announcements that you want to see.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option('--time-one-latest-time', type=custom_types.CLI_DATETIME, help=u"""The boundary for the latest `timeOneValue` date on announcements that you want to see.""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'announcements_service', 'class': 'AnnouncementsCollection'})
@cli_util.wrap_exceptions
def list_announcements(ctx, from_json, all_pages, page_size, compartment_id, limit, page, announcement_type, lifecycle_state, is_banner, sort_by, sort_order, time_one_earliest_time, time_one_latest_time):

    if all_pages and limit:
Exemple #24
0
    u"""Gets a secret bundle that matches either the specified `stage`, `label`, or `versionNumber` parameter. If none of these parameters are provided, the bundle for the secret version marked as `CURRENT` will be returned. \n[Command Reference](getSecretBundle)"""
)
@cli_util.option('--secret-id',
                 required=True,
                 help=u"""The OCID of the secret.""")
@cli_util.option('--version-number',
                 type=click.INT,
                 help=u"""The version number of the secret.""")
@cli_util.option(
    '--secret-version-name',
    help=
    u"""The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.)"""
)
@cli_util.option('--stage',
                 type=custom_types.CliCaseInsensitiveChoice([
                     "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED"
                 ]),
                 help=u"""The rotation state of the secret version.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(
    input_params_to_complex_types={},
    output_type={
        'module': 'secrets',
        'class': 'SecretBundle'
    })
@cli_util.wrap_exceptions
def get_secret_bundle(ctx, from_json, secret_id, version_number,
                      secret_version_name, stage):
@cli_util.help_option_group
def work_request_group():
    pass


integration_root_group.add_command(integration_instance_group)
integration_root_group.add_command(work_request_error_group)
integration_root_group.add_command(work_request_log_entry_group)
integration_root_group.add_command(work_request_group)


@integration_instance_group.command(name=cli_util.override('integration.change_integration_instance_compartment.command_name', 'change-compartment'), help=u"""Change the compartment for an integration instance""")
@cli_util.option('--integration-instance-id', required=True, help=u"""Unique Integration Instance identifier.""")
@cli_util.option('--compartment-id', help=u"""Compartment Identifier.""")
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain 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.""")
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request to see if it has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
@cli_util.wrap_exceptions
def change_integration_instance_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, integration_instance_id, compartment_id, if_match):

    if isinstance(integration_instance_id, six.string_types) and len(integration_instance_id.strip()) == 0:
        raise click.UsageError('Parameter --integration-instance-id cannot be whitespace or empty string')

    kwargs = {}
    if if_match is not None:
        kwargs['if_match'] = if_match
Exemple #26
0
        'create'),
    help=
    u"""Creates a request that specifies preferences for the tenancy regarding receiving announcements by email. \n[Command Reference](createAnnouncementsPreference)"""
)
@cli_util.option(
    '--type',
    required=True,
    help=
    u"""The entity type, which specifies a model that either creates new announcement email preferences or updates existing preferences."""
)
@cli_util.option(
    '--preference-type',
    required=True,
    type=custom_types.CliCaseInsensitiveChoice([
        "OPT_IN_TENANT_ANNOUNCEMENTS",
        "OPT_IN_TENANT_AND_INFORMATIONAL_ANNOUNCEMENTS",
        "OPT_OUT_ALL_ANNOUNCEMENTS"
    ]),
    help=
    u"""The string representing the user's preference, whether to opt in to only required announcements, to opt in to all announcements, including informational announcements, or to opt out of all announcements."""
)
@cli_util.option(
    '--is-unsubscribed',
    type=click.BOOL,
    help=
    u"""A Boolean value to indicate whether the specified compartment chooses to not to receive informational announcements by email. (Manage preferences for receiving announcements by email by specifying the `preferenceType` attribute instead.)"""
)
@cli_util.option(
    '--compartment-id',
    help=
    u"""The OCID of the compartment for which you want to manage announcement email preferences. (Specify the tenancy by providing the root compartment OCID.)"""
Exemple #27
0
                           'cancel-key-deletion'),
    help=
    u"""Cancels the scheduled deletion of the specified key. Canceling a scheduled deletion restores the key to the respective states they were in before the deletion was scheduled.

The top level --endpoint parameter must be supplied for this operation.""")
@cli_util.option('--key-id', required=True, help=u"""The OCID of the key.""")
@cli_util.option(
    '--if-match',
    help=
    u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value."""
)
@cli_util.option(
    '--wait-for-state',
    type=custom_types.CliCaseInsensitiveChoice([
        "CREATING", "ENABLING", "ENABLED", "DISABLING", "DISABLED", "DELETING",
        "DELETED", "PENDING_DELETION", "SCHEDULING_DELETION",
        "CANCELLING_DELETION", "UPDATING"
    ]),
    help=
    """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. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned."""
)
@cli_util.option(
    '--max-wait-seconds',
    type=click.INT,
    help=
    """The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds."""
)
@cli_util.option(
    '--wait-interval-seconds',
    type=click.INT,
    help=
Exemple #28
0
        attach_devices_details=details,
        **kwargs)
    cli_util.render_response(result, ctx)


@transfer_package_group.command(name=cli_util.override(
    'create_transfer_package.command_name', 'create'),
                                help=u"""Create a new Transfer Package""")
@cli_util.option('--id', required=True, help=u"""ID of the Transfer Job""")
@cli_util.option('--original-package-delivery-tracking-number', help=u"""""")
@cli_util.option('--return-package-delivery-tracking-number', help=u"""""")
@cli_util.option('--package-delivery-vendor', help=u"""""")
@cli_util.option(
    '--wait-for-state',
    type=custom_types.CliCaseInsensitiveChoice([
        "PREPARING", "SHIPPING", "RECEIVED", "PROCESSING", "PROCESSED",
        "RETURNED", "DELETED", "CANCELLED", "CANCELLED_RETURNED"
    ]),
    help=
    """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. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned."""
)
@cli_util.option(
    '--max-wait-seconds',
    type=click.INT,
    help=
    """The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds."""
)
@cli_util.option(
    '--wait-interval-seconds',
    type=click.INT,
    help=
    """Check every --wait-interval-seconds to see whether the resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds."""
                 required=True,
                 help=u"""The ID of the asynchronous request.""")
@cli_util.option(
    '--compartment-id',
    required=True,
    help=u"""The ID of the compartment in which to list resources.""")
@cli_util.option(
    '--page',
    help=
    u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call."""
)
@cli_util.option('--limit',
                 type=click.INT,
                 help=u"""The maximum number of items to return.""")
@cli_util.option('--sort-order',
                 type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]),
                 help=u"""The sort order to use, either 'asc' or 'desc'.""")
@cli_util.option(
    '--all',
    'all_pages',
    is_flag=True,
    help=
    """Fetches all pages of results. If you provide this option, then you cannot provide the --limit option."""
)
@cli_util.option(
    '--page-size',
    type=click.INT,
    help=
    """When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise."""
)
@json_skeleton_utils.get_cli_json_input_option({})
Exemple #30
0
        'activate-monitoring-plugin'),
    help=
    u"""Activates Resource Plugin for compute instance identified by the instance ocid. Stores monitored instances Id and its state. Tries to enable Resource Monitoring plugin by making remote calls to Oracle Cloud Agent and Management Agent Cloud Service. \n[Command Reference](activateMonitoringPlugin)"""
)
@cli_util.option('--monitored-instance-id',
                 required=True,
                 help=u"""OCID of monitored instance.""")
@cli_util.option(
    '--if-match',
    help=
    u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value."""
)
@cli_util.option(
    '--wait-for-state',
    type=custom_types.CliCaseInsensitiveChoice([
        "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED",
        "CANCELING", "CANCELED"
    ]),
    multiple=True,
    help=
    """This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain 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."""
)
@cli_util.option(
    '--max-wait-seconds',
    type=click.INT,
    help=
    """The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds."""
)
@cli_util.option(
    '--wait-interval-seconds',
    type=click.INT,
    help=