Skip to content

create_service_sync_config async

create_service_sync_config(
    service_name: ResourceName,
    repository_provider: RepositoryProvider,
    repository_name: RepositoryName,
    branch: GitBranchName,
    file_path: OpsFilePath,
    *,
    config_overrides: Optional[AsyncProtonClientConfig] = None,
) -> CreateServiceSyncConfigOutput

Create the Proton Ops configuration file.

Parameters:

  • service_name (ResourceName) –

    The name of the service the Proton Ops file is for.

  • repository_provider (RepositoryProvider) –

    The provider type for your repository.

  • repository_name (RepositoryName) –

    The repository name.

  • branch (GitBranchName) –

    The repository branch for your Proton Ops file.

  • file_path (OpsFilePath) –

    The path to the Proton Ops file.

Raises:

Source code in docs_src/capo_proton/_services/async_proton.py
async def create_service_sync_config(
    self,
    service_name: "capo_proton.types.resource_name.ResourceName",
    repository_provider: "capo_proton.types.repository_provider.RepositoryProvider",
    repository_name: "capo_proton.types.repository_name.RepositoryName",
    branch: "capo_proton.types.git_branch_name.GitBranchName",
    file_path: "capo_proton.types.ops_file_path.OpsFilePath",
    *,
    config_overrides: Optional[AsyncProtonClientConfig] = None,
) -> "capo_proton.types.create_service_sync_config_output.CreateServiceSyncConfigOutput":
    """<p>Create the Proton Ops configuration file.</p>

    Args:
        service_name: <p>The name of the service the Proton Ops file is for.</p>
        repository_provider: <p>The provider type for your repository.</p>
        repository_name: <p>The repository name.</p>
        branch: <p>The repository branch for your Proton Ops file.</p>
        file_path: <p>The path to the Proton Ops file.</p>

    Raises:
        capo_proton.errors.access_denied_exception.AccessDeniedException: <p>There <i>isn't</i> sufficient access for performing this action.</p>
        capo_proton.errors.conflict_exception.ConflictException: <p>The request <i>couldn't</i> be made due to a conflicting operation or resource.</p>
        capo_proton.errors.internal_server_exception.InternalServerException: <p>The request failed to register with the service.</p>
        capo_proton.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-limits.html">Proton Quotas</a> in the <i>Proton User Guide</i>.</p>
        capo_proton.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_proton.errors.validation_exception.ValidationException: <p>The input is invalid or an out-of-range value was supplied for the input parameter.</p>
        capo_proton.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_proton.types.create_service_sync_config_input.CreateServiceSyncConfigInput]",
    ) -> AsyncOperationResponse[
        "capo_proton.types.create_service_sync_config_output.CreateServiceSyncConfigOutput"
    ]:
        import capo_proton._operations.aws_proton20200720.create_service_sync_config

        (
            output,
            http_response,
        ) = await capo_proton._operations.aws_proton20200720.create_service_sync_config.async_create_service_sync_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateServiceSyncConfig")
    )
    input_: capo_proton.types.create_service_sync_config_input.CreateServiceSyncConfigInput = {
        "service_name": service_name,
        "repository_provider": repository_provider,
        "repository_name": repository_name,
        "branch": branch,
        "file_path": file_path,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output