|
| 1 | +// This file was generated using action-binding-generator. Don't change it by hand, otherwise your |
| 2 | +// changes will be overwritten with the next binding code regeneration. |
| 3 | +// See https://github.com/typesafegithub/github-workflows-kt for more info. |
| 4 | +@file:Suppress( |
| 5 | + "DataClassPrivateConstructor", |
| 6 | + "UNUSED_PARAMETER", |
| 7 | +) |
| 8 | + |
| 9 | +package io.github.typesafegithub.workflows.actions.azure |
| 10 | + |
| 11 | +import io.github.typesafegithub.workflows.domain.actions.Action |
| 12 | +import io.github.typesafegithub.workflows.domain.actions.RegularAction |
| 13 | +import java.util.LinkedHashMap |
| 14 | +import kotlin.Boolean |
| 15 | +import kotlin.String |
| 16 | +import kotlin.Suppress |
| 17 | +import kotlin.Unit |
| 18 | +import kotlin.collections.Map |
| 19 | +import kotlin.collections.toList |
| 20 | +import kotlin.collections.toTypedArray |
| 21 | + |
| 22 | +/** |
| 23 | + * Action: Azure Login |
| 24 | + * |
| 25 | + * Authenticate to Azure and run your Azure CLI or Azure PowerShell based actions or scripts. |
| 26 | + * |
| 27 | + * [Action on GitHub](https://github.com/Azure/login) |
| 28 | + * |
| 29 | + * @param creds Paste output of `az ad sp create-for-rbac` as value of secret variable: |
| 30 | + * AZURE_CREDENTIALS |
| 31 | + * @param clientId ClientId of the Azure Service principal created. |
| 32 | + * @param tenantId TenantId of the Azure Service principal created. |
| 33 | + * @param subscriptionId Azure subscriptionId |
| 34 | + * @param enableAzPSSession Set this value to true to enable Azure PowerShell Login in addition to |
| 35 | + * Azure CLI login |
| 36 | + * @param environment Name of the environment. Supported values are azurecloud, azurestack, |
| 37 | + * azureusgovernment, azurechinacloud, azuregermancloud. Default being azurecloud |
| 38 | + * @param allowNoSubscriptions Set this value to true to enable support for accessing tenants |
| 39 | + * without subscriptions |
| 40 | + * @param audience Provide audience field for access-token. Default value is |
| 41 | + * api://AzureADTokenExchange |
| 42 | + * @param authType The type of authentication. Supported values are SERVICE_PRINCIPAL, IDENTITY. |
| 43 | + * Default value is SERVICE_PRINCIPAL |
| 44 | + * @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by |
| 45 | + * the binding |
| 46 | + * @param _customVersion Allows overriding action's version, for example to use a specific minor |
| 47 | + * version, or a newer version that the binding doesn't yet know about |
| 48 | + */ |
| 49 | +public data class LoginV2 private constructor( |
| 50 | + /** |
| 51 | + * Paste output of `az ad sp create-for-rbac` as value of secret variable: AZURE_CREDENTIALS |
| 52 | + */ |
| 53 | + public val creds: String? = null, |
| 54 | + /** |
| 55 | + * ClientId of the Azure Service principal created. |
| 56 | + */ |
| 57 | + public val clientId: String? = null, |
| 58 | + /** |
| 59 | + * TenantId of the Azure Service principal created. |
| 60 | + */ |
| 61 | + public val tenantId: String? = null, |
| 62 | + /** |
| 63 | + * Azure subscriptionId |
| 64 | + */ |
| 65 | + public val subscriptionId: String? = null, |
| 66 | + /** |
| 67 | + * Set this value to true to enable Azure PowerShell Login in addition to Azure CLI login |
| 68 | + */ |
| 69 | + public val enableAzPSSession: Boolean? = null, |
| 70 | + /** |
| 71 | + * Name of the environment. Supported values are azurecloud, azurestack, azureusgovernment, |
| 72 | + * azurechinacloud, azuregermancloud. Default being azurecloud |
| 73 | + */ |
| 74 | + public val environment: LoginV2.Environment? = null, |
| 75 | + /** |
| 76 | + * Set this value to true to enable support for accessing tenants without subscriptions |
| 77 | + */ |
| 78 | + public val allowNoSubscriptions: Boolean? = null, |
| 79 | + /** |
| 80 | + * Provide audience field for access-token. Default value is api://AzureADTokenExchange |
| 81 | + */ |
| 82 | + public val audience: String? = null, |
| 83 | + /** |
| 84 | + * The type of authentication. Supported values are SERVICE_PRINCIPAL, IDENTITY. Default value |
| 85 | + * is SERVICE_PRINCIPAL |
| 86 | + */ |
| 87 | + public val authType: LoginV2.AuthType? = null, |
| 88 | + /** |
| 89 | + * Type-unsafe map where you can put any inputs that are not yet supported by the binding |
| 90 | + */ |
| 91 | + public val _customInputs: Map<String, String> = mapOf(), |
| 92 | + /** |
| 93 | + * Allows overriding action's version, for example to use a specific minor version, or a newer |
| 94 | + * version that the binding doesn't yet know about |
| 95 | + */ |
| 96 | + public val _customVersion: String? = null, |
| 97 | +) : RegularAction<Action.Outputs>("Azure", "login", _customVersion ?: "v2") { |
| 98 | + public constructor( |
| 99 | + vararg pleaseUseNamedArguments: Unit, |
| 100 | + creds: String? = null, |
| 101 | + clientId: String? = null, |
| 102 | + tenantId: String? = null, |
| 103 | + subscriptionId: String? = null, |
| 104 | + enableAzPSSession: Boolean? = null, |
| 105 | + environment: LoginV2.Environment? = null, |
| 106 | + allowNoSubscriptions: Boolean? = null, |
| 107 | + audience: String? = null, |
| 108 | + authType: LoginV2.AuthType? = null, |
| 109 | + _customInputs: Map<String, String> = mapOf(), |
| 110 | + _customVersion: String? = null, |
| 111 | + ) : this(creds=creds, clientId=clientId, tenantId=tenantId, subscriptionId=subscriptionId, |
| 112 | + enableAzPSSession=enableAzPSSession, environment=environment, |
| 113 | + allowNoSubscriptions=allowNoSubscriptions, audience=audience, authType=authType, |
| 114 | + _customInputs=_customInputs, _customVersion=_customVersion) |
| 115 | + |
| 116 | + @Suppress("SpreadOperator") |
| 117 | + override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( |
| 118 | + *listOfNotNull( |
| 119 | + creds?.let { "creds" to it }, |
| 120 | + clientId?.let { "client-id" to it }, |
| 121 | + tenantId?.let { "tenant-id" to it }, |
| 122 | + subscriptionId?.let { "subscription-id" to it }, |
| 123 | + enableAzPSSession?.let { "enable-AzPSSession" to it.toString() }, |
| 124 | + environment?.let { "environment" to it.stringValue }, |
| 125 | + allowNoSubscriptions?.let { "allow-no-subscriptions" to it.toString() }, |
| 126 | + audience?.let { "audience" to it }, |
| 127 | + authType?.let { "auth-type" to it.stringValue }, |
| 128 | + *_customInputs.toList().toTypedArray(), |
| 129 | + ).toTypedArray() |
| 130 | + ) |
| 131 | + |
| 132 | + override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId) |
| 133 | + |
| 134 | + public sealed class Environment( |
| 135 | + public val stringValue: String, |
| 136 | + ) { |
| 137 | + public object Azurecloud : LoginV2.Environment("azurecloud") |
| 138 | + |
| 139 | + public object Azurestack : LoginV2.Environment("azurestack") |
| 140 | + |
| 141 | + public object Azureusgovernment : LoginV2.Environment("azureusgovernment") |
| 142 | + |
| 143 | + public object Azurechinacloud : LoginV2.Environment("azurechinacloud") |
| 144 | + |
| 145 | + public object Azuregermancloud : LoginV2.Environment("azuregermancloud") |
| 146 | + |
| 147 | + public class Custom( |
| 148 | + customStringValue: String, |
| 149 | + ) : LoginV2.Environment(customStringValue) |
| 150 | + } |
| 151 | + |
| 152 | + public sealed class AuthType( |
| 153 | + public val stringValue: String, |
| 154 | + ) { |
| 155 | + public object ServicePrincipal : LoginV2.AuthType("SERVICE_PRINCIPAL") |
| 156 | + |
| 157 | + public object Identity : LoginV2.AuthType("IDENTITY") |
| 158 | + |
| 159 | + public class Custom( |
| 160 | + customStringValue: String, |
| 161 | + ) : LoginV2.AuthType(customStringValue) |
| 162 | + } |
| 163 | +} |
0 commit comments