Skip to content

create_site

create_site(
    name: SiteName,
    *,
    config_overrides: Optional[OutpostsClientConfig] = None,
    description: Optional[SiteDescription] = None,
    notes: Optional[SiteNotes] = None,
    tags: Optional[TagMap] = None,
    operating_address: Optional[Address] = None,
    shipping_address: Optional[Address] = None,
    rack_physical_properties: Optional[RackPhysicalProperties] = None,
) -> CreateSiteOutput

Creates a site for an Outpost.

Parameters:

  • notes (Optional[SiteNotes], default: None ) –

    Additional information that you provide about site access requirements, electrician scheduling, personal protective equipment, or regulation of equipment materials that could affect your installation process.

  • tags (Optional[TagMap], default: None ) –

    The tags to apply to a site.

  • operating_address (Optional[Address], default: None ) –

    The location to install and power on the hardware. This address might be different from the shipping address.

  • shipping_address (Optional[Address], default: None ) –

    The location to ship the hardware. This address might be different from the operating address.

  • rack_physical_properties (Optional[RackPhysicalProperties], default: None ) –

    Information about the physical and logistical details for the rack at this site. For more information about hardware requirements for racks, see Network readiness checklist in the Amazon Web Services Outposts User Guide.

Raises:

Source code in docs_src/capo_outposts/_services/outposts.py
def create_site(
    self,
    name: "capo_outposts.types.site_name.SiteName",
    *,
    config_overrides: Optional[OutpostsClientConfig] = None,
    description: Optional[
        "capo_outposts.types.site_description.SiteDescription"
    ] = None,
    notes: Optional["capo_outposts.types.site_notes.SiteNotes"] = None,
    tags: Optional["capo_outposts.types.tag_map.TagMap"] = None,
    operating_address: Optional["capo_outposts.types.address.Address"] = None,
    shipping_address: Optional["capo_outposts.types.address.Address"] = None,
    rack_physical_properties: Optional[
        "capo_outposts.types.rack_physical_properties.RackPhysicalProperties"
    ] = None,
) -> "capo_outposts.types.create_site_output.CreateSiteOutput":
    """<p> Creates a site for an Outpost. </p>

    Args:
        notes: <p>Additional information that you provide about site access requirements, electrician scheduling, personal protective equipment, or regulation of equipment materials that could affect your installation process. </p>
        tags: <p> The tags to apply to a site. </p>
        operating_address: <p> The location to install and power on the hardware. This address might be different from the shipping address. </p>
        shipping_address: <p> The location to ship the hardware. This address might be different from the operating address. </p>
        rack_physical_properties: <p> Information about the physical and logistical details for the rack at this site. For more information about hardware requirements for racks, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#checklist">Network readiness checklist</a> in the Amazon Web Services Outposts User Guide. </p>

    Raises:
        capo_outposts.errors.access_denied_exception.AccessDeniedException: <p>You do not have permission to perform this operation.</p>
        capo_outposts.errors.conflict_exception.ConflictException: <p>Updating or deleting this resource can cause an inconsistent state.</p>
        capo_outposts.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
        capo_outposts.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded a service quota.</p>
        capo_outposts.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
        capo_outposts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_outposts.types.create_site_input.CreateSiteInput]",
    ) -> OperationResponse[
        "capo_outposts.types.create_site_output.CreateSiteOutput"
    ]:
        import capo_outposts._operations.outposts_olaf_service.create_site

        output, http_response = (
            capo_outposts._operations.outposts_olaf_service.create_site.create_site(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_outposts.types.create_site_input.CreateSiteInput",
    ) -> dict[str, Any]:
        import capo_outposts.types.create_site_input

        return capo_outposts.types.create_site_input.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateSite", redact_input=_redact_input)
    )
    input_: capo_outposts.types.create_site_input.CreateSiteInput = {"name": name}
    if description is not None:
        input_["description"] = description
    if notes is not None:
        input_["notes"] = notes
    if tags is not None:
        input_["tags"] = tags
    if operating_address is not None:
        input_["operating_address"] = operating_address
    if shipping_address is not None:
        input_["shipping_address"] = shipping_address
    if rack_physical_properties is not None:
        input_["rack_physical_properties"] = rack_physical_properties

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