Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

/**
* Runs the specified PowerShell on the VM (Windows). Corresponds to Packer
* powershell provisioner.
* powershell provisioner. Exactly one of 'script' or 'inline' can be
* specified.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("PowerShell")
Expand All @@ -28,7 +29,13 @@ public class ImageTemplatePowerShellCustomizer extends ImageTemplateCustomizer {
private String script;

/**
* The validExitCodes property.
* Array of PowerShell commands to execute.
*/
@JsonProperty(value = "inline")
private List<String> inline;

/**
* Valid exit codes for the PowerShell script. [Default: 0].
*/
@JsonProperty(value = "validExitCodes")
private List<Integer> validExitCodes;
Expand All @@ -54,7 +61,27 @@ public ImageTemplatePowerShellCustomizer withScript(String script) {
}

/**
* Get the validExitCodes value.
* Get array of PowerShell commands to execute.
*
* @return the inline value
*/
public List<String> inline() {
return this.inline;
}

/**
* Set array of PowerShell commands to execute.
*
* @param inline the inline value to set
* @return the ImageTemplatePowerShellCustomizer object itself.
*/
public ImageTemplatePowerShellCustomizer withInline(List<String> inline) {
this.inline = inline;
return this;
}

/**
* Get valid exit codes for the PowerShell script. [Default: 0].
*
* @return the validExitCodes value
*/
Expand All @@ -63,7 +90,7 @@ public List<Integer> validExitCodes() {
}

/**
* Set the validExitCodes value.
* Set valid exit codes for the PowerShell script. [Default: 0].
*
* @param validExitCodes the validExitCodes value to set
* @return the ImageTemplatePowerShellCustomizer object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@

package com.microsoft.azure.management.imagebuilder.v2019_02_01_preview;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
* Runs a shell script during the customization phase (Linux).
* Runs a shell script during the customization phase (Linux). Corresponds to
* Packer shell provisioner. Exactly one of 'script' or 'inline' can be
* specified.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("Shell")
Expand All @@ -25,6 +28,12 @@ public class ImageTemplateShellCustomizer extends ImageTemplateCustomizer {
@JsonProperty(value = "script")
private String script;

/**
* Array of shell commands to execute.
*/
@JsonProperty(value = "inline")
private List<String> inline;

/**
* Get the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc.
*
Expand All @@ -45,4 +54,24 @@ public ImageTemplateShellCustomizer withScript(String script) {
return this;
}

/**
* Get array of shell commands to execute.
*
* @return the inline value
*/
public List<String> inline() {
return this.inline;
}

/**
* Set array of shell commands to execute.
*
* @param inline the inline value to set
* @return the ImageTemplateShellCustomizer object itself.
*/
public ImageTemplateShellCustomizer withInline(List<String> inline) {
this.inline = inline;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public interface RunOutput extends HasInner<RunOutputInner>, Indexable, Refresha
String artifactId();

/**
* @return the artifactLocation value.
* @return the artifactUri value.
*/
String artifactLocation();
String artifactUri();

/**
* @return the id value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public String artifactId() {
}

@Override
public String artifactLocation() {
return this.inner().artifactLocation();
public String artifactUri() {
return this.inner().artifactUri();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public class RunOutputInner extends SubResource {
private String artifactId;

/**
* The URL location of the artifact.
* The location URI of the artifact.
*/
@JsonProperty(value = "properties.artifactLocation")
private String artifactLocation;
@JsonProperty(value = "properties.artifactUri")
private String artifactUri;

/**
* Provisioning state of the resource. Possible values include: 'Creating',
Expand Down Expand Up @@ -69,22 +69,22 @@ public RunOutputInner withArtifactId(String artifactId) {
}

/**
* Get the URL location of the artifact.
* Get the location URI of the artifact.
*
* @return the artifactLocation value
* @return the artifactUri value
*/
public String artifactLocation() {
return this.artifactLocation;
public String artifactUri() {
return this.artifactUri;
}

/**
* Set the URL location of the artifact.
* Set the location URI of the artifact.
*
* @param artifactLocation the artifactLocation value to set
* @param artifactUri the artifactUri value to set
* @return the RunOutputInner object itself.
*/
public RunOutputInner withArtifactLocation(String artifactLocation) {
this.artifactLocation = artifactLocation;
public RunOutputInner withArtifactUri(String artifactUri) {
this.artifactUri = artifactUri;
return this;
}

Expand Down