Skip to content

create_storage_profile

create_storage_profile(
    farm_id: FarmId,
    display_name: ResourceName,
    os_family: StorageProfileOperatingSystemFamily,
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    file_system_locations: Optional[FileSystemLocationsList] = None,
) -> CreateStorageProfileResponse

Creates a storage profile that specifies the operating system, file type, and file location of resources used on a farm.

Parameters:

  • farm_id (FarmId) –

    The farm ID of the farm to connect to the storage profile.

  • client_token (Optional[ClientToken], default: None ) –

    The unique token which the server uses to recognize retries of the same request.

  • display_name (ResourceName) –

    The display name of the storage profile.

    This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.

  • os_family (StorageProfileOperatingSystemFamily) –

    The type of operating system (OS) for the storage profile.

  • file_system_locations (Optional[FileSystemLocationsList], default: None ) –

    File system paths to include in the storage profile.

Raises:

Source code in docs_src/capo_deadline/_services/deadline.py
def create_storage_profile(
    self,
    farm_id: "capo_deadline.types.farm_id.FarmId",
    display_name: "capo_deadline.types.resource_name.ResourceName",
    os_family: "capo_deadline.types.storage_profile_operating_system_family.StorageProfileOperatingSystemFamily",
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
    client_token: Optional["capo_deadline.types.client_token.ClientToken"] = None,
    file_system_locations: Optional[
        "capo_deadline.types.file_system_locations_list.FileSystemLocationsList"
    ] = None,
) -> "capo_deadline.types.create_storage_profile_response.CreateStorageProfileResponse":
    """<p>Creates a storage profile that specifies the operating system, file type, and file location of resources used on a farm.</p>

    Args:
        farm_id: <p>The farm ID of the farm to connect to the storage profile.</p>
        client_token: <p>The unique token which the server uses to recognize retries of the same request.</p>
        display_name: <p>The display name of the storage profile.</p> <important> <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p> </important>
        os_family: <p>The type of operating system (OS) for the storage profile.</p>
        file_system_locations: <p>File system paths to include in the storage profile.</p>

    Raises:
        capo_deadline.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
        capo_deadline.errors.internal_server_error_exception.InternalServerErrorException: <p>Deadline Cloud can't process your request right now. Try again later.</p>
        capo_deadline.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_deadline.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.</p>
        capo_deadline.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota.</p>
        capo_deadline.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
        capo_deadline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_deadline.types.create_storage_profile_request.CreateStorageProfileRequest]",
    ) -> OperationResponse[
        "capo_deadline.types.create_storage_profile_response.CreateStorageProfileResponse"
    ]:
        import capo_deadline._operations.deadline.create_storage_profile

        output, http_response = (
            capo_deadline._operations.deadline.create_storage_profile.create_storage_profile(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_deadline.types.create_storage_profile_request.CreateStorageProfileRequest",
    ) -> dict[str, Any]:
        import capo_deadline.types.create_storage_profile_request

        return capo_deadline.types.create_storage_profile_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateStorageProfile", redact_input=_redact_input),
    )
    input_: capo_deadline.types.create_storage_profile_request.CreateStorageProfileRequest = {
        "farm_id": farm_id,
        "display_name": display_name,
        "os_family": os_family,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if file_system_locations is not None:
        input_["file_system_locations"] = file_system_locations

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