
commonMain.aws.sdk.kotlin.services.lightsail.model.ContainerServiceEcrImagePullerRoleRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
/**
* Describes a request to activate or deactivate the role that you can use to grant an Amazon Lightsail container service access to Amazon Elastic Container Registry (Amazon ECR) private repositories.
*
* When activated, Lightsail creates an Identity and Access Management (IAM) role for the specified Lightsail container service. You can use the ARN of the role to create a trust relationship between your Lightsail container service and an Amazon ECR private repository in your Amazon Web Services account. This allows your container service to pull images from Amazon ECR private repositories. For more information, see [Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-container-service-ecr-private-repo-access) in the *Amazon Lightsail Developer Guide*.
*/
public class ContainerServiceEcrImagePullerRoleRequest private constructor(builder: Builder) {
/**
* A Boolean value that indicates whether to activate the role.
*/
public val isActive: kotlin.Boolean? = builder.isActive
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.ContainerServiceEcrImagePullerRoleRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ContainerServiceEcrImagePullerRoleRequest(")
append("isActive=$isActive)")
}
override fun hashCode(): kotlin.Int {
var result = isActive?.hashCode() ?: 0
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as ContainerServiceEcrImagePullerRoleRequest
if (isActive != other.isActive) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.ContainerServiceEcrImagePullerRoleRequest = Builder(this).apply(block).build()
public class Builder {
/**
* A Boolean value that indicates whether to activate the role.
*/
public var isActive: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.ContainerServiceEcrImagePullerRoleRequest) : this() {
this.isActive = x.isActive
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.ContainerServiceEcrImagePullerRoleRequest = ContainerServiceEcrImagePullerRoleRequest(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy