Skip to content

update_custom_routing_accelerator_attributes

update_custom_routing_accelerator_attributes(
    accelerator_arn: GenericString,
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
    flow_logs_enabled: Optional[GenericBoolean] = None,
    flow_logs_s3_bucket: Optional[GenericString] = None,
    flow_logs_s3_prefix: Optional[GenericString] = None,
) -> UpdateCustomRoutingAcceleratorAttributesResponse

Update the attributes for a custom routing accelerator.

Parameters:

  • accelerator_arn (GenericString) –

    The Amazon Resource Name (ARN) of the custom routing accelerator to update attributes for.

  • flow_logs_enabled (Optional[GenericBoolean], default: None ) –

    Update whether flow logs are enabled. The default value is false. If the value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified.

    For more information, see Flow logs in the Global Accelerator Developer Guide.

  • flow_logs_s3_bucket (Optional[GenericString], default: None ) –

    The name of the Amazon S3 bucket for the flow logs. Attribute is required if FlowLogsEnabled is true. The bucket must exist and have a bucket policy that grants Global Accelerator permission to write to the bucket.

  • flow_logs_s3_prefix (Optional[GenericString], default: None ) –

    Update the prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if FlowLogsEnabled is true.

    If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:

    DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id

Raises:

Source code in docs_src/capo_global_accelerator/_services/global_accelerator.py
def update_custom_routing_accelerator_attributes(
    self,
    accelerator_arn: "capo_global_accelerator.types.generic_string.GenericString",
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
    flow_logs_enabled: Optional[
        "capo_global_accelerator.types.generic_boolean.GenericBoolean"
    ] = None,
    flow_logs_s3_bucket: Optional[
        "capo_global_accelerator.types.generic_string.GenericString"
    ] = None,
    flow_logs_s3_prefix: Optional[
        "capo_global_accelerator.types.generic_string.GenericString"
    ] = None,
) -> "capo_global_accelerator.types.update_custom_routing_accelerator_attributes_response.UpdateCustomRoutingAcceleratorAttributesResponse":
    """<p>Update the attributes for a custom routing accelerator. </p>

    Args:
        accelerator_arn: <p>The Amazon Resource Name (ARN) of the custom routing accelerator to update attributes for.</p>
        flow_logs_enabled: <p>Update whether flow logs are enabled. The default value is false. If the value is true, <code>FlowLogsS3Bucket</code> and <code>FlowLogsS3Prefix</code> must be specified.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html">Flow logs</a> in the <i>Global Accelerator Developer Guide</i>.</p>
        flow_logs_s3_bucket: <p>The name of the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is <code>true</code>. The bucket must exist and have a bucket policy that grants Global Accelerator permission to write to the bucket.</p>
        flow_logs_s3_prefix: <p>Update the prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is <code>true</code>. </p> <p>If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:</p> <p>DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id</p>

    Raises:
        capo_global_accelerator.errors.accelerator_not_found_exception.AcceleratorNotFoundException: <p>The accelerator that you specified doesn't exist.</p>
        capo_global_accelerator.errors.access_denied_exception.AccessDeniedException: <p>You don't have access permission.</p>
        capo_global_accelerator.errors.internal_service_error_exception.InternalServiceErrorException: <p>There was an internal error for Global Accelerator.</p>
        capo_global_accelerator.errors.invalid_argument_exception.InvalidArgumentException: <p>An argument that you specified is invalid.</p>
        capo_global_accelerator.errors.transaction_in_progress_exception.TransactionInProgressException: <p>There's already a transaction in progress. Another transaction can't be processed.</p>
        capo_global_accelerator.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_global_accelerator.types.update_custom_routing_accelerator_attributes_request.UpdateCustomRoutingAcceleratorAttributesRequest]",
    ) -> OperationResponse[
        "capo_global_accelerator.types.update_custom_routing_accelerator_attributes_response.UpdateCustomRoutingAcceleratorAttributesResponse"
    ]:
        import capo_global_accelerator._operations.global_accelerator_v20180706.update_custom_routing_accelerator_attributes

        output, http_response = (
            capo_global_accelerator._operations.global_accelerator_v20180706.update_custom_routing_accelerator_attributes.update_custom_routing_accelerator_attributes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateCustomRoutingAcceleratorAttributes"),
    )
    input_: capo_global_accelerator.types.update_custom_routing_accelerator_attributes_request.UpdateCustomRoutingAcceleratorAttributesRequest = {
        "accelerator_arn": accelerator_arn
    }
    if flow_logs_enabled is not None:
        input_["flow_logs_enabled"] = flow_logs_enabled
    if flow_logs_s3_bucket is not None:
        input_["flow_logs_s3_bucket"] = flow_logs_s3_bucket
    if flow_logs_s3_prefix is not None:
        input_["flow_logs_s3_prefix"] = flow_logs_s3_prefix

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output