// GenerateInventory generates the distribution inventory for aws-copyami resource.
GenerateInventory generates the distribution inventory for aws-copyami resource.
// GenerateInventory generates the distribution inventory for aws - copyami resource .
func (r *Resource) GenerateInventory() ([]byte, error) {
	type inventoryRecord struct {
		ResourceName *string `yaml:"resourceName"`
		Output       Record  `yaml:"output"`
	}
	ir := inventoryRecord{
		ResourceName: r.Name,
		Output:       r.Record,
	}
	inventory := []inventoryRecord{ir}
	bs, err := yaml.Marshal(inventory)
	if err != nil {
		return nil, err
	}
	return bs, nil
}
func ( r * Resource ) GenerateInventory ( ) ( [ ] byte , error ) { type inventoryRecord struct { ResourceName * string `yaml:"resourceName"` Output Record `yaml:"output"` } ir := inventoryRecord { ResourceName : r . Name , Output : r . Record , } inventory := [ ] inventoryRecord { ir } bs , err := yaml . Marshal ( inventory ) if err != nil { return nil , err } return bs , nil }
GenerateInventory generates the distribution inventory for aws-copyami resource.
GenerateInventory generates the distribution inventory for aws - copyami resource .