Skip to content

update_template_sync_config async

update_template_sync_config(
    template_name: ResourceName,
    template_type: TemplateType,
    repository_provider: RepositoryProvider,
    repository_name: RepositoryName,
    branch: GitBranchName,
    *,
    config_overrides: Optional[AsyncProtonClientConfig] = None,
    subdirectory: Optional[Subdirectory] = None,
) -> UpdateTemplateSyncConfigOutput

Update template sync configuration parameters, except for the templateName and templateType. Repository details (branch, name, and provider) should be of a linked repository. A linked repository is a repository that has been registered with Proton. For more information, see CreateRepository.

Parameters:

  • template_name (ResourceName) –

    The synced template name.

  • template_type (TemplateType) –

    The synced template type.

  • repository_provider (RepositoryProvider) –

    The repository provider.

  • repository_name (RepositoryName) –

    The repository name (for example, myrepos/myrepo).

  • branch (GitBranchName) –

    The repository branch for your template.

  • subdirectory (Optional[Subdirectory], default: None ) –

    A subdirectory path to your template bundle version. When included, limits the template bundle search to this repository directory.

Raises:

Source code in docs_src/capo_proton/_services/async_proton.py
async def update_template_sync_config(
    self,
    template_name: "capo_proton.types.resource_name.ResourceName",
    template_type: "capo_proton.types.template_type.TemplateType",
    repository_provider: "capo_proton.types.repository_provider.RepositoryProvider",
    repository_name: "capo_proton.types.repository_name.RepositoryName",
    branch: "capo_proton.types.git_branch_name.GitBranchName",
    *,
    config_overrides: Optional[AsyncProtonClientConfig] = None,
    subdirectory: Optional["capo_proton.types.subdirectory.Subdirectory"] = None,
) -> "capo_proton.types.update_template_sync_config_output.UpdateTemplateSyncConfigOutput":
    """<p>Update template sync configuration parameters, except for the <code>templateName</code> and <code>templateType</code>. Repository details (branch, name, and provider) should be of a linked repository. A linked repository is a repository that has been registered with Proton. For more information, see <a>CreateRepository</a>.</p>

    Args:
        template_name: <p>The synced template name.</p>
        template_type: <p>The synced template type.</p>
        repository_provider: <p>The repository provider.</p>
        repository_name: <p>The repository name (for example, <code>myrepos/myrepo</code>).</p>
        branch: <p>The repository branch for your template.</p>
        subdirectory: <p>A subdirectory path to your template bundle version. When included, limits the template bundle search to this repository directory.</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.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource <i>wasn't</i> found.</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.update_template_sync_config_input.UpdateTemplateSyncConfigInput]",
    ) -> AsyncOperationResponse[
        "capo_proton.types.update_template_sync_config_output.UpdateTemplateSyncConfigOutput"
    ]:
        import capo_proton._operations.aws_proton20200720.update_template_sync_config

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTemplateSyncConfig")
    )
    input_: capo_proton.types.update_template_sync_config_input.UpdateTemplateSyncConfigInput = {
        "template_name": template_name,
        "template_type": template_type,
        "repository_provider": repository_provider,
        "repository_name": repository_name,
        "branch": branch,
    }
    if subdirectory is not None:
        input_["subdirectory"] = subdirectory

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